package com.otitan.forest.right.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.otitan.forest.right.entity.SysUserEntity;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * 用户
 *
 * @author xiazw
 * @email *****@mail.com
 * @date 2020-08-04 14:19:45
 */
@Mapper
public interface SysUserMapper extends BaseMapper<SysUserEntity> {
    SysUserEntity findByUserName(String username);

    /**
     * 从智慧林业系统查询用户信息 （二期）
     *
     * @param []
     * @return java.util.List<com.otitan.forest.right.entity.SysUserEntity>
     * @throws
     * @author jiachangsen
     * @date 2020/08/21 15:11
     */
    List<SysUserEntity> queryUserInformationOfSmartForestrySystem2();

    /**
     * 从智慧林业系统查询用户信息 （一期）
     *
     * @param []
     * @return java.util.List<com.otitan.forest.right.entity.SysUserEntity>
     * @throws
     * @author jiachangsen
     * @date 2020/08/21 15:11
     */
    List<SysUserEntity> queryUserInformationOfSmartForestrySystem1();

    /**
     * 同步用户信息前，删除之前同步的用户信息
     *
     * @param []
     * @return long
     * @throws
     * @author jiachangsen
     * @date 2020/08/21 16:40
     */
    long delPreviouslySyncedUserInformation();

    /**
     * 同步用户信息前，删除之前同步的用户角色信息
     *
     * @param []
     * @return long
     * @throws
     * @author jiachangsen
     * @date 2020/08/21 16:40
     */
    long delUserRoleInformation();


    /**
     * 修改密码
     *
     * @param []
     * @return void
     * @throws
     * @author wangqingsong
     * @date 2020/09/2 10:40
     */
    void updatePwdByUsername(Map<String, String> map);
}
